#ifndef __GEOH3DNEIGHBOURSNODE_H__
#define __GEOH3DNEIGHBOURSNODE_H__

#include "X3DGeometricPropertyNode.h"

namespace H3D {

  /// \ingroup AbstractNodes
  /// \class GeoH3DNeighboursNode
  /// \brief This is the base node type for all neighbourhood node types in H3D. All
  /// neighbours information are specified in nodes derived from this abstract node type.
  class H3DAPI_API GeoH3DNeighboursNode : public X3DGeometricPropertyNode {
  public:
    
    /// Constructor.
    GeoH3DNeighboursNode( Inst< SFNode>  _metadata = 0 );

    /// Accessor. Gets neighbours associated with a vertex described thanks to its index.
    /// \param index Coordinate index with which obtain the neighbourhood information.
    /// \return Neighbourhood information of a vertex.
    virtual vector< unsigned long > getNeighbours( unsigned int index ) = 0;

    /// Accessor. Gets neighbours associated with a vertex described thanks to its index.
    /// \param index Coordinate index with which obtain the neighbourhood information.
    /// \return Neighbourhood information of a vertex.
    virtual const vector< unsigned long > getNeighbours( unsigned int index ) const = 0;

    virtual string defaultXMLContainerField() {
      return "neighbours";
    }

    /// Return number of neighbours available for a vertex identified by its index.
    /// \param index Coordinate index with which obtain number of neighbours
    /// \return Number of neighbours associated with a vertex.
    virtual unsigned int nrAvailableNeighbours( unsigned int index ) = 0; 
  };
}

#endif
